    <style>
        /* 之前的样式保持不变 */
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background-color: #f9f9f9;
            color: #333;
            margin: 0;
        }

        h1 {
            text-align: center;
            color: #2c3e50;
            margin-bottom: 30px;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
        }

        form {
            background-color: white;
            padding: 30px;
            border-radius: 10px;
            box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
            width: 60%;
            margin: 0 auto;
            box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
        }

        label {
            display: block;
            margin-bottom: 8px;
            font-size: 16px;
            color: #555;
        }

        input[type="text"],
        textarea,
        input[type="number"] {
            width: 100%;
            padding: 12px;
            margin-bottom: 20px;
            border: 1px solid #ccc;
            border-radius: 5px;
            transition: border-color 0.3s ease;
        }

        input[type="text"]:focus,
        textarea:focus,
        input[type="number"]:focus {
            border-color: #2c3e50;
            outline: none;
        }

        input[type="submit"] {
            background-color: #2c3e50;
            color: white;
            padding: 12px 25px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            transition: background-color 0.3s ease;
        }

        input[type="submit"]:hover {
            background-color: #34495e;
        }

        /* 新增样式，将提交按钮居中 */
        form input[type="submit"] {
            display: block;
            margin: 0px auto 0; /* 上外边距 20px，左右自动居中，下外边距 0 */
        }
    </style>
</head>

<body>
    <h1>添加新知识</h1>
    <form id="editUserForm" method="post" action="{{ url_for('add_new_knowledge') }}">
        {{ form.hidden_tag() }}
        <label for="name">分类名称:</label>
        {{ form.name(id="name", placeholder="输入分类名称") }}
        <label for="description">描述:</label>
        {{ form.description(id="description", placeholder="输入描述") }}
        <label for="suitable_age">适用年龄:</label>
        {{ form.suitable_age(id="suitable_age", placeholder="输入适用年龄") }}
        <label for="suitable_gender">适用性别:</label>
        {{ form.suitable_gender(id="suitable_gender", placeholder="输入适用性别") }}
        <label for="suggestions">营养建议:</label>
        {{ form.suggestions(id="suggestions", placeholder="输入建议") }}
        <label for="recommended_products">推荐产品:</label>
        {{ form.recommended_products(id="recommended_products", placeholder="输入推荐产品") }}
        <p><input type="button" value="提交" onclick="submitForm()"></p>
    </form>
</body>

</html>
